// 该文件为处理错误的中间件
module.exports = async (ctx, next) => {
  try {
    await next()
  } catch (error) {
    ctx.body = {
      code: '500',
      mag: '服务器未知错误'
    }
  }
}
